using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spinning.Spinning.Entity;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Spinning.Spinning.Scenes.Basic
{
   public class Scene : BaseEntity
    {
        protected Texture2D _backTexture;
        public Vector2 Size { get; set; }

        public override void OnLoad()
        {
            _backTexture = new Texture2D(Game1.graphicsDevice, 1, 1);
            _backTexture.SetData(new[] { Color.White });
        }

        protected override void DrawSelf(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Microsoft.Xna.Framework.GameTime gameTime)
        {
            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.None, RasterizerState.CullCounterClockwise, null, Projection);
            spriteBatch.Draw(_backTexture, Position, null, this.Color, Rotation, Origin, Scale * Size, SpriteEffects.None, 0);
            spriteBatch.End();
            drawChildren(spriteBatch, gameTime);
        }
    }
}
